<template>
  <div class="container">
    <div class="app-container">
      <div>
        <el-button type="primary" @click="handleLook()">查看1</el-button>
      </div>
      <div>
        <el-button type="primary" @click="handlePandian()">点击发起盘点</el-button>
      </div>
      <div>
        <el-button type="primary" @click="handleTransfer()">穿梭框</el-button>
      </div>
      <div>
        <el-button type="primary" @click="handlePeople()">点击发起盘点人员维度</el-button>
      </div>

      <transfer-dialog ref="TransferDialog" :transfer-dialog-visible.sync="transferDialogVisible" />
      <pandian-dialog ref="PandianDialog" :pandian-dialog-visible.sync="pandianDialogVisible" />
      <inventory-dialog ref="InventoryDialog" :inventory-dialog-visible.sync="inventoryDialogVisible" />
      <el-dialog title="收货地址" :visible.sync="dialogTableVisible" @close="close">
        <el-table :data="gridData">
          <el-table-column property="date" label="日期" width="150" />
          <el-table-column property="name" label="姓名" width="200" />
          <el-table-column property="address" label="地址">
            <template slot-scope>
              <el-button size="mini" type="text" @click="handleDetail">详情</el-button>
            </template>
          </el-table-column>
        </el-table>
      </el-dialog>
      <detail-dialog ref="DetailDialog" :detail-dialog-visible.sync="detailDialogVisible" />
    </div>
  </div>
</template>

<script>
import DetailDialog from '@/views/employee/components/detail-dialog.vue'
import PandianDialog from '@/views/employee/components/pandian-dialog.vue'
import TransferDialog from '@/views/employee/components/transfer-dialog.vue'
import InventoryDialog from '@/views/employee/components/inventory-dialog.vue'

export default {
  name: 'Employee',
  // eslint-disable-next-line vue/no-unused-components
  components: { PandianDialog, DetailDialog, TransferDialog, InventoryDialog },
  data() {
    return {
      detailDialogVisible: false,
      dialogTableVisible: false,
      pandianDialogVisible: false,
      transferDialogVisible: false,
      inventoryDialogVisible: false,
      gridData: [{ date: '2024-06-14', name: '阿福', address: '123', No: '23141234' }]
    }
  },
  methods: {
    handleLook() {
      this.dialogTableVisible = true
    },
    handleDetail() {
      this.detailDialogVisible = true
    },
    close() {
      this.detailDialogVisible = false
      this.dialogTableVisible = false
    },
    handlePandian() {
      this.pandianDialogVisible = true
    },
    handlePeople() {
      this.inventoryDialogVisible = true
    },
    handleTransfer() {
      this.transferDialogVisible = true
    }
  }
}
</script>
